<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body {
            align-items: center;
            height: 100vh;
        }

        button {
            position: relative;
        }

        button::before {
            content: attr(data-count);
            position: absolute;
            top: -0.75em;
            right: -0.75em;
            width: 1.5em;
            height: 1.5em;
            display: flex;
            justify-content: center;
            align-items: center;
            border-radius: 50%;
            background-color: red;
            color: white;
        }
    </style>
</head>
<body>
<button data-count="0">🍔</button>

<script type = "text/javascript">
    const btn = document.querySelector("[data-count]")

    btn.addEventListener("click", (e) => {
        e.currentTarget.dataset.count++
    })
</script>
</body>
</html>